<template>
  <div class="home">
    <swiper :options="swiperOption" ref="mySwiper">
      <!-- slides -->
      <swiper-slide><a href="http://www.baidu.com"><img src="@/assets/img/banner1.jpg" class="banner-img"/></a></swiper-slide>
      <swiper-slide><a href="http://www.baidu.com"><img src="@/assets/img/banner2.jpg" class="banner-img"/></a></swiper-slide>
      <swiper-slide><a href="http://www.baidu.com"><img src="@/assets/img/banner3.jpg" class="banner-img"/></a></swiper-slide>
      <swiper-slide><a href="http://www.baidu.com"><img src="@/assets/img/banner4.jpg" class="banner-img"/></a></swiper-slide>
      <swiper-slide><a href="http://www.baidu.com"><img src="@/assets/img/banner5.jpg" class="banner-img"/></a></swiper-slide>
      <!-- Optional controls -->
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
// import axios from 'axios'

export default {
  name: 'home',
  data () {
    return {
      // Swiper配置项
      swiperOption: {
        loop: true,
        pagination: {
          el: '.swiper-pagination'
        },
        autoplay: {
          delay: 2500,
          stopOnLastSlide: false,
          disableOnInteraction: true
        }
      }
    }
  }
}
</script>

<style>
.banner-img {
  display: block;
  width: 100%;
}
.swiper-pagination-bullet-active {
  background: #fe5d59 !important;
}
</style>
